from PyQt6.QtWidgets import (QMainWindow, QWidget, QVBoxLayout, QSplitter)
from PyQt6.QtCore import Qt
from utils.style_manager import StyleManager

from widgets.account_panel import AccountPanel
from widgets.center_panel import CenterPanel

class MainWindow(QMainWindow):
    def __init__(self):
        super().__init__()
        self.setWindowTitle("wx")
        self.setMinimumSize(1500, 900)
        self.setup_ui()
        
    def setup_ui(self):
        # 创建中央部件
        central_widget = QWidget()
        self.setCentralWidget(central_widget)
        
        # 主布局
        main_layout = QVBoxLayout(central_widget)
        main_layout.setContentsMargins(10, 20, 10, 20)
        main_layout.setSpacing(0)
        
        # 创建水平分割器用于左右布局
        horizontal_splitter = QSplitter(Qt.Orientation.Horizontal)
        horizontal_splitter.setChildrenCollapsible(False)
        
        # 左侧面板
        self.account_panel = AccountPanel()
        horizontal_splitter.addWidget(self.account_panel)
        
        # 中间面板
        self.center_panel = CenterPanel()
        horizontal_splitter.addWidget(self.center_panel)
        
        # 设置分割器比例 - 左右比例1:2
        horizontal_splitter.setSizes([500, 900])
        
        main_layout.addWidget(horizontal_splitter) 